<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
    <script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
    <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
    <script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
    <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
</head>
<body>
<!--
*************************************************************************
   Generated by HCODE at 2017-04-27 14:50:22
   From: https://code.hcharts.cn/demos/hhhhD1
*************************************************************************
 -->
<div id="container" style="min-width:400px;height:400px"></div>

<script>
    var da_ta={{ da_ta|safe }};
    $(function () {
        // Radialize the colors
        Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
            return {
                radialGradient: {cx: 0.5, cy: 0.3, r: 0.7},
                stops: [
                    [0, color],
                    [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
                ]
            };
        });
        // 构建图表
        $('#container').highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                type: 'bar',
                backgroundColor: 'rgba(255, 255, 255, 0)',
                plotBorderColor: null,
                plotBackgroundImage: null

            },
            title: {
                text: '点击次数各省统计百分比扇形图'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        },
                        connectorColor: 'silver'
                    }
                }
            },
            series: [{
                type: 'pie',
                name: '各省统计百分比扇形图',
                data:da_ta
                        /*[
                    ['Firefox', 45.0],
                    ['IE', 26.8],
                    ['Safari', 8.5],
                    ['Opera', 6.2],
                    ['其他', 0.7]
                ]*/
            }]
        });
    });
</script>
</body>
</html>